package com.nthink.indicators.service.operationindex.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nthink.indicators.mapper.operationindex.DipMapper;
import com.nthink.indicators.pojo.operationindex.dip.AvgDayTop10diagnosis;
import com.nthink.indicators.pojo.operationindex.dip.DipData;
import com.nthink.indicators.service.operationindex.DipService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DipServiceImpl extends ServiceImpl<DipMapper, DipData> implements DipService {
    @Override
    public DipData getDipData(Date startTime, Date endTime) {
        DipData dipData = new DipData(baseMapper.getDischargeCountOver30Day(startTime, endTime));
        return dipData;
    }

    @Override
    public List<AvgDayTop10diagnosis> getAvgDayTop10diagnosis(Date startTime, Date endTime) {
        return baseMapper.getAvgDayTop10diagnosis(startTime, endTime);
    }
}